#pragma once
#include <iostream>
#include <vector>

class Util 
{
public:
    //aaaaa\r\nvdgvds\r\nasf\r\n
    static void cutString(const std::string& str,const std::string& sep, std::vector<std::string>* out)
    {
        size_t start = 0;
        while(start < str.size())
        {
            std::size_t pos = str.find(sep,start);
            if(pos == std::string::npos) break;//没找到
            std::string s = str.substr(start,pos -start);
            out->push_back(s);
            start += pos - start;
            start += sep.size();
        }
        if(start < str.size())
        {
            out->push_back(str.substr(start));
        }

    }
};